package core;

/**
 * This class represents a type of notification as sent to Observers.  This class encodes
 * information about what changed and how they changed.
 * @author Royce
 *
 */
public class Notification {
	/**A Tag, which can store any Object that needs to be updated*/
	private Object _tag;
	
	/**The NotificationType of this Notification*/
	private NotificationType _type;
	
	/**
	 * Constructs a Notification with the given tag and type
	 * @param tag An Object reference to store in this Notification
	 * @param type The NotificationType of this Notification
	 * 
	 * @pre tag, type != null
	 * @post A Notification is constructed with the given information
	 */
	public Notification(Object tag, NotificationType type) {
		_tag = tag;
		_type = type;
	}
	
	/**
	 *
	 * @return the stored Object reference in this Notification
	 * 
	 * @pre none.
	 * @post see return statement
	 */
	public Object getTag() {
		return _tag;
	}
	
	/**
	 * 
	 * @return the NotificationType of this Notification
	 * 
	 * @pre none.
	 * @post see return statement
	 */
	public NotificationType getType() {
		return _type;
	}
}
